home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 19
/
Amiga Plus Leser CD 19.iso
/
Online
/
AmigaTalk
/
intuition
/
WindowFlags.st
< prev
next >
Wrap
Text File
|
2002-03-15
|
3KB
|
80 lines
" -------------------------------------------------------------------- "
" WindowFlags Class is a Singleton class that allows the user to "
" reference Window Flags without having to remember their actual "
" hexadecimal values. "
""
" The User does NOT need to create one of these, since Intuition Class "
" will instantiate the only needed instance of this Class. See the "
" SetupIntuition.st source file for the method(s) that help the User "
" with this Class. "
""
" EXAMPLE: 'myTag <- intuition getWindowFlag: #WFLG_SIZEGADGET' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" -------------------------------------------------------------------- "
Class WindowFlags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ (self privateSetup)
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self at: #WFLG_SIZEGADGET put: 1.
self at: #WFLG_DRAGBAR put: 2.
self at: #WFLG_DEPTHGADGET put: 4.
self at: #WFLG_CLOSEGADGET put: 8.
self at: #WFLG_REFRESHBITS put: 16rC0. "For masking"
self at: #WFLG_SIZEBRIGHT put: 16r10.
self at: #WFLG_SIZEBBOTTOM put: 16r20.
self at: #WFLG_SMART_REFRESH put: 0.
self at: #WFLG_SIMPLE_REFRESH put: 16r40.
self at: #WFLG_SUPER_BITMAP put: 16r80.
self at: #WFLG_OTHER_REFRESH put: 16rC0.
self at: #WFLG_BACKDROP put: 16r100.
self at: #WFLG_REPORTMOUSE put: 16r200.
self at: #WFLG_GIMMEZEROZERO put: 16r400.
self at: #WFLG_BORDERLESS put: 16r800.
self at: #WFLG_ACTIVATE put: 16r1000.
self at: #WFLG_RMBTRAP put: 16r10000.
self at: #WFLG_NOCAREREFRESH put: 16r20000.
self at: #WFLG_NW_EXTENDED put: 16r40000.
self at: #WFLG_NEWLOOKMENUS put: 16r200000.
self at: #WFLG_VISITOR put: 16r8000000.
self at: #WFLG_ZOOMED put: 16r10000000.
self at: #WFLG_HASZOOM put: 16r20000000.
"These flags are set only by Intuition.
YOU MAY NOT SET THEM YOURSELF!"
self at: #WFLG_WINDOWACTIVE put: 16r2000.
self at: #WFLG_INREQUEST put: 16r4000.
self at: #WFLG_MENUSTATE put: 16r8000.
self at: #WFLG_WINDOWREFRESH put: 16r1000000.
self at: #WFLG_WBENCHWINDOW put: 16r2000000.
self at: #WFLG_WINDOWTICKED put: 16r4000000.
].
^ self "uniqueInstance??"
]